package com.macro.mall.common.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author: TuDou
 * @create: 2024-10-25 16:50
 *
 * 高频接口限流
 *  *     @RateLimiterDIY(value = 10, durationInSeconds = 60) //限制为每分钟 10 次请求
 **/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RateLimiterDIY {
    int value() default 1;
    int durationInSeconds() default 1;
}
